package com.allwees.bs.c.module.product.init;

import com.allwees.core.common.util.StringUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author Daniel
 * @Version 1.0.0
 * @Description
 * @CreateTime 2020/10/12 14:54
 */
@Component
public class BanWordsHelper {

    @Value("${system.ban.words}")
    private String[] searchBanWords;

    public boolean contains(String keyword){
        return StringUtil.containsAnyIgnoreCase(keyword, searchBanWords);
    }
}
